<html>
<body>
<p>Reports code which emulates <code>.flatten</code> on collections of collections.</p>

<p><b>Example:</b>
<pre><code>
  Seq(seq1, seq2).flatMap(identity)
  Seq(seq1, seq2).flatMap(x => identity(x))
  Seq(seq1, seq2).flatMap(x => x)

  val nestedOption = Option(Some(10))
  nestedOption.getOrElse(None)
  nestedOption.map(_.get)
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
  Seq(seq1, seq2).flatten
  Seq(seq1, seq2).flatten
  Seq(seq1, seq2).flatten

  val nestedOption = Option(Some(10))
  nestedOption.flatten
  nestedOption.flatten
</code></pre>
<!-- tooltip end -->
</body>
</html>